package com.mengtian_tech.smart_lab.entity.cms;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
  
/**
 * 附件
 * @author 王旭东
 *
 */
@Entity
@Table(name="attach")
public class Attach implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -84685646100978761L;

	
	@Id
	@Column(name = "id", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.AUTO) 
	private Long id;
	 
	@Column(name="file_name")
	private String fileName;
	
	 
	/**
	 * 创建时间
	 */
	@Column(name="CREATE_DATE")
	private Date createDate;
	
	/**
	 * 附件拥有人的Id
	 */
	@Column(name="owner_id")
	private String ownerId;
	
	@Column(name="orig_file_name")
	private String origFileName;
	
	@Column(name="file_type")
	private String fileType;


	public Long getId() {
		return id;
	}


	public void setId(Long iD) {
		id = iD;
	}


	public String getFileName() {
		return fileName;
	}


	public void setFileName(String fileName) {
		this.fileName = fileName;
	}


	public Date getCreateDate() {
		return createDate;
	}


	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Attach other = (Attach) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}


	public String getOwnerId() {
		return ownerId;
	}


	public void setOwnerId(String ownerId) {
		this.ownerId = ownerId;
	}


	public String getOrigFileName() {
		return origFileName;
	}


	public void setOrigFileName(String origFileName) {
		this.origFileName = origFileName;
	}


	public String getFileType() {
		return fileType;
	}


	public void setFileType(String fileType) {
		this.fileType = fileType;
	} 
	
}
